package com.example.consumer01.controller;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import org.springframework.stereotype.Component;

@Component
public class SentinelService {

    private int i = 0;

    @SentinelResource(value = "testSentinel") //本项目内sentinel能生效
    public void testSentinel() {
        System.out.println("测试Sentinel " + ++i);
    }
}
